<?php
	$path_one = 'admin/admin_system';
	$path_two = 'admin/admin_module';
	$filename = 'admin/admin_admin_list';
	require_once("header.php");
	require_once("admin_comm.php");
	require_once $_site->get_handlepath('admin');
	$id= request('id',false,true);
	$result=admin_fun_find_admin($id);	
	
	$log=admin_fun_money_log($id);
?>
<script type="text/javascript" charset="utf-8">

	loader.file({
		plugin:['validform/main','dialog/main'],
		js:['city_area', 'html'],
		skincss:['list']
	});
	$(document).ready(function(){
		var form_obj=$("#form1").Validform({
		   tiptype: function(msg, o, cssctl){
			   if(!o.obj.is("form")){
				   var obj = o.obj.parent("td").find('tt');
				   cssctl(obj, o.type);
				   obj.text(msg);
			   }
		   },
		   postonce:true

		})
	})	
</script>
</head>
<body>
	<div class="position_nav">你所在的当前位置：<?php echo $path_str;?> &gt; 充值</div>
		<div class="main">
			<form action="/handle.php" method="post" id='form1'>
			<input type="hidden" name="h" value="admin/money_log">
			<input type="hidden" name="id" value="<?php echo $result['id']?>">
			<table  cellpadding="0" cellspacing="1" border="0" class="table table_text">
				<tr>
					<td class="left">管理员帐号：</td>
					<td>
						<strong><?php echo $result['account'] ;?></strong>
					</td>
				</tr>
				<tr>
					<td class="left">充值金额：</td>
					<td>
						<input type="text" class="w260" name='money' value="" datatype='n1-8' nullmsg='请填写金额' errormsg='1-8位整数'><tt></tt>
					</td>
				</tr>
				<tr>
					<td class="left">记录条数：</td>
					<td>
						<input type="text" class="w260" name='code' value="" datatype='n1-8' nullmsg='请填写记录条数' errormsg="1-8位整数"><tt></tt>
					</td>
				</tr>
				<tr>
					<td class="left">备注信息：</td>
					<td>
						<textarea name="comment"></textarea>
						<tt></tt>
					</td>
				</tr>				
				<tr>
					<td></td>
					<td>
						<input class="button1" type="submit" value="充值">
					</td>
				</tr>

			</table>
			</form>
			
			<?php 
			if($log['rows']){
			?>
			<table  cellpadding="0" cellspacing="1" border="0" class="table table_text" style="margin-top:20px;">
				<tr>
					<td colspan="4"><h2>充值日志：</h2></td>					
				</tr>
				<tr>
					<th align="left">时间</th>					
					<th align="left">金额</th>
					<th align="left">记录条数</th>
					<th align="left">备注</th>											
				</tr>				
				<?php 
                    foreach($log['rows'] as $val){
				?>
				<tr>				   
					<td><?php echo date('Y-m-d H:i',$val['time']);?></td>
					<td>
						<?php echo $val['money'];?>
					</td>
					<td>
						<?php echo $val['code'];?>
					</td>
					<td>
						<?php echo $val['comment'];?>
					</td>										
				</tr>				
				<?php 
				}
				?>		
			</table>	
			<?php 
			}
			?>		
			
		</div>
	</div>
</body>
</html>



